package com.example.lotterysystem.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @auther falls_vc
 * description:
 * @date 2025/6/7  21:46
 */

@Getter
@AllArgsConstructor
public enum ActivityStatusEnum {
    RUNNING(1,"活动进行中"),
    COMPLETED(2,"活动已完成");

    private final Integer code;
    private final String message;

    public static ActivityStatusEnum forName(String name) {
        for (ActivityStatusEnum activitystatusEnum : ActivityStatusEnum.values()) {
            if(activitystatusEnum.name().equals(name)) {
                return activitystatusEnum;
            }
        }
        return null;
    }
}
